﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common;

namespace Ex01
{
    /// <summary>
    /// 问题描述：如何让代码具备更好的可读性
    /// 解决方案：使用隐含类型
    /// </summary>
    ///
    public class Product
    {
        public int ProductId { get; set; }
        public string Name { get; set; }

    }
    class Program
    {
        static void Main(string[] args)
        {
            var product = 1.0f;
            var products = new List<Product>();
            int num = 12;


            string[] names = { "Tom", "Dick", "Harry", "Mary", "Jay" };

            var r1 = names.Where(n=>n.Contains("a"));
            var r2 = r1.OrderBy(n=>n.Length);
            var r3 = r2.Select(n=>n.ToUpper());


            var query = names.Where(n=>n.Contains("a"))
                .OrderBy(n=>n.Length)
                .Select(n=>n.ToLower());
            query.Dump();
            Console.ReadKey();
        }
    }

}
